package com.qf.dao;

import com.qf.entity.News;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @description: cool新闻
 * @author: No1
 * @create: 2020-11-30 11:33:07
 */
public interface NewsDao {
    /*新增*/
    @Insert("insert into t_news (id,uid,tid,title,image_url,video_url,time,content,ctime,flag) values(#{id},#{uid},#{tid},#{title},#{image_url},#{video_url},#{time},#{content},#{ctime},#{flag})")
    int insert(News news);

    /*删除*/
    @Delete("delete from t_news where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from t_news")
    List<News> all();
}